﻿@model IEnumerable<GroceryList.Front.Web.ViewModels.ListaCompraSimpleDto>

@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <title>Listas</title>
    <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>
    <a href="@Url.Action("Index", "Lista")">New</a>
    <table>
        <thead>
        <tr>
            <th>Nombre</th>
            <th>Fecha</th>
            <th>Acciones</th>
        </tr>
        </thead>
    @foreach (var item in Model) 
    { 
        <tr> 
            <td> 
                @Html.DisplayFor(modelItem => item.Nombre)
            </td> 
            <td> 
                @Html.DisplayFor(modelItem => item.Fecha) 
            </td>             
            <td> 
                <a href="@Url.Action("Index", "Lista", new { id = item.Codigo })">Edit</a>

                <a href="@Url.Action("Delete", "Home", new { codigoLista = item.Codigo })">Delete</a>
            </td> 
        </tr> 
    }
    </table>
</body>
</html>
